CC = gcc
DEBUG = -g -pg 
LIBS =  -lm -lz -lpthread
BIN =  TbamSample NbamSample auto_train

TbamSample-obj = TbamSample.o 
NbamSample-obj = NbamSample.o

HTSLIB_DIR = htslib
SAMTOOLS_DIR = samtools
INCLUDE = -I. -I$(SAMTOOLS_DIR) -I$(HTSLIB_DIR)

CFLAGS?= $(DEBUG)  -Wall  -D_FILE_OFFSET_BITS=64 -pthread $(INCLUDE)



all:$(BIN)


NbamSample:  $(NbamSample-obj) 
	$(CC)  $(CFLAGS) -o $@ $^  $(LIBS)  $(SAMTOOLS_DIR)/libbam.a $(HTSLIB_DIR)/libhts.a

TbamSample:	$(TbamSample-obj)
	$(CC)  $(CFLAGS) -o $@ $^  $(LIBS)  $(SAMTOOLS_DIR)/libbam.a $(HTSLIB_DIR)/libhts.a
clean:
	rm  -f  $(BIN) *.o *~  gmon.out



